package com.sbr.seb.wicket.page;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState;
import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;

public class SpecificationProvider implements ISortableDataProvider {

	private Collection<Specification> specList = new ArrayList<Specification>();
	
	public SpecificationProvider() {
		specList.add(new Specification("seb"));
	}
	
	@Override
	public Iterator iterator(int arg0, int arg1) {
		// TODO Auto-generated method stub
		return specList.iterator();
	}

	@Override
	public IModel model(final Object object) {
		return new IModel() {

			@Override
			public Object getObject() {
				return object;
			}

			@Override
			public void setObject(Object arg0) {
			}

			@Override
			public void detach() {
				// TODO Auto-generated method stub
				
			}
			
		};
	}

	@Override
	public int size() {
		return specList.size();
	}

	@Override
	public void detach() {
	}

	@Override
	public ISortState getSortState() {
		return null;
	}

	@Override
	public void setSortState(ISortState arg0) {
	}

}
